/*
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License Version
 *  3 as published by the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
 *  USA.
 */

#ifndef PROXY_H
#define PROXY_H

#include <optra/common/sdk.h>

namespace Optra{

    class Gui;
    class ZoneInfo;
    class ZoneInterface;

    class SDK_EXPORT Proxy : public QObject
    {
        Q_OBJECT
        Q_ENUMS(DirType)

        Q_CLASSINFO("Name", "Proxy")
        Q_CLASSINFO("Version", "0.0.1")
    public:
        Proxy(QObject* parent = 0);
        virtual ~Proxy();

        enum DirType {program, user, temp, zones, applications};
        virtual QDir directory(Proxy::DirType d) = 0;

        virtual QString localHostName() = 0;

        virtual Gui* gui() = 0;

        virtual Optra::ZoneInterface* mainZone() = 0;

        void error(const QString& log, ZoneInterface* sender);
        void critical(const QString& log, ZoneInterface* sender);
        void warning(const QString& log, ZoneInterface* sender);
        void info(const QString& log, ZoneInterface* sender);

        void debug(const QString& log, ZoneInterface* sender);
        void trace(const QString& log, ZoneInterface* sender);

        virtual ZoneInterface* zoneInterface(const QString& name) = 0;
        virtual QVariant zoneProperty(const QString& zone, const QString& name, const QVariant& params) = 0;
    };

};


#endif // PROXY_H

